/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.bio.jpa.entities;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Diego
 */
@Entity
@Table(name = "extension_helper")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "ExtensionHelper.findAll", query = "SELECT e FROM ExtensionHelper e"),
    @NamedQuery(name = "ExtensionHelper.findByExt", query = "SELECT e FROM ExtensionHelper e WHERE e.ext = :ext"),
    @NamedQuery(name = "ExtensionHelper.findByExtDesc", query = "SELECT e FROM ExtensionHelper e WHERE e.extDesc = :extDesc"),
    @NamedQuery(name = "ExtensionHelper.findByRemark", query = "SELECT e FROM ExtensionHelper e WHERE e.remark = :remark"),
    @NamedQuery(name = "ExtensionHelper.findByHandler", query = "SELECT e FROM ExtensionHelper e WHERE e.handler = :handler")})
public class ExtensionHelper implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @NotNull
    @Size(min = 1, max = 10)
    @Column(name = "ext")
    private String ext;
    @Size(max = 200)
    @Column(name = "ext_desc")
    private String extDesc;
    @Size(max = 450)
    @Column(name = "remark")
    private String remark;
    @Size(max = 80)
    @Column(name = "handler")
    private String handler;

    public ExtensionHelper() {
    }

    public ExtensionHelper(String ext) {
        this.ext = ext;
    }

    public String getExt() {
        return ext;
    }

    public void setExt(String ext) {
        this.ext = ext;
    }

    public String getExtDesc() {
        return extDesc;
    }

    public void setExtDesc(String extDesc) {
        this.extDesc = extDesc;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getHandler() {
        return handler;
    }

    public void setHandler(String handler) {
        this.handler = handler;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (ext != null ? ext.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ExtensionHelper)) {
            return false;
        }
        ExtensionHelper other = (ExtensionHelper) object;
        if ((this.ext == null && other.ext != null) || (this.ext != null && !this.ext.equals(other.ext))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bio.jpa.entities.ExtensionHelper[ ext=" + ext + " ]";
    }

}
